package main

import (
	"GoReptile/internal/models"
	"github.com/astaxie/beego/httplib"
)

func main() {
	Getgradbta()
}

func Getgradbta() {
	//爬虫入口url
	urls := "https://movie.douban.com/subject/26430636/?from=showing"
	//爬取
	resps := httplib.Get(urls)
	//得到内容
	htmls, err := resps.String()
	if err != nil {
		panic(err)
	}
	maps := make(map[string]string)
	maps["movie_name"] = models.GetPianNmae(htmls)
	maps["movie_director"] = models.GetMovieDirector(htmls)
	maps["movie_pic"] = models.GetPicsrc(htmls)
	maps["movie_writer"] = models.GetBianju(htmls)
	maps["movie_country"] = models.Getage(htmls)
	maps["movie_main_character"] = models.GetZhuyan(htmls)
	maps["movie_type"] = models.Dianyleix(htmls)
	maps["movie_language"] = models.GetLang(htmls)
	maps["movie_on_time"] = models.GetShangtime(htmls)
	maps["movie_span"] = models.GetTime(htmls)
	maps["movie_grade"] = models.Getsping(htmls)

}
